import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
import { getCategoryAPI } from '@/apis/layout'
//全局获取导航列表数据
export const useCategoryListStore = defineStore('categoryLsit', () => {
    const categoryList = ref([])

    const getCategory = async () => {
        const res = await getCategoryAPI()
        categoryList.value = res.result
    }

    return {
        categoryList,
        getCategory
    }

})